#ifndef QLINEWIDGET_H
#define QLINEWIDGET_H

#include "qabstractgraphics.h"

enum enLineDirection
{
    LD_Left_Right,
    LD_Top_Bottom,
    LD_LeftTop_RightBottom,
    LD_LeftBottom_RightTop
};

class QLineWidget : public QAbstractGraphicsWidget
{
    Q_OBJECT
    Q_PROPERTY(int direction READ direction WRITE setDirection)
public:
    explicit QLineWidget(QWidget *parent = 0);

    void    setDirection(int direction);
    int     direction();
protected:
    void    paintEvent(QPaintEvent *);
protected:
    int     m_direction;
};


class QLineWidgetHost : public QAbstractGraphicsHost
{
    Q_OBJECT
public:
    Q_INVOKABLE QLineWidgetHost(QAbstractHost *parent = 0);

    static QString get_show_name();
    static QString get_show_icon();
    static QString get_show_group();

public slots:
    int     direction();
    void    setDirection(int direction);
protected:
    void    init_property();
protected:
    void    create_object();
};


#endif // QLINEWIDGET_H
